package com.huang.decorator;

public class Client {

    public static void main(String[] args) {
        FastFood food = new FiredRice();
        System.out.println(food.getDesc() + " " + food.cost()+"元");
        System.out.println("===================");
        //在上面的炒饭中加入一个鸡蛋
        food = new Egg(food);
        System.out.println(food.getDesc() + " " + food.cost()+"元");
        System.out.println("===================");
        //在鸡蛋炒饭中再一个鸡蛋
        food = new Egg(food);
        System.out.println(food.getDesc() + " " + food.cost()+"元");
        System.out.println("===================");
        food = new Bacon(food);
        System.out.println(food.getDesc() + " " + food.cost()+"元");
    }

}
